﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace IService.Blog
{
    public interface IMusicService
    {
        #region Get

        /// <summary>
        /// 查询所有音乐（分页）
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public Task<MessageModel<PageInfoModel<BMusic>>> GetAllToPage(int offset, int limit);

        /// <summary>
        /// 查询所有音乐
        /// </summary>
        public Task<MessageModel<List<BMusic>>> GetAll();

        /// <summary>
        /// 根据条件表达式查询数据列表
        /// </summary>
        /// <param name="whereExpression">条件表达式</param>
        /// <returns>数据列表</returns>
        public Task<MessageModel<List<BMusic>>> GetByExpression<BMusic>(Expression<Func<BMusic, bool>> whereExpression);


        /// <summary>
        /// 查询音乐按ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<MessageModel<BMusic>> GetById(int id);
        #endregion

        #region Post
        /// <summary>
        /// 添加音乐
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public Task<MessageModel<string>> Post(BMusic parameter);

        #endregion

        #region Put
        /// <summary>
        /// 修改音乐
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public Task<MessageModel<string>> Put(BMusic parameter);

        #endregion

        #region Delete
        /// <summary>
        /// 删除音乐
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<MessageModel<bool>> DelById(int id);

        #endregion
    }
}